<%@ page language="java" contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<link rel="stylesheet" href="../css/bootstrap.css"/> 
<title>用户列表</title>
</head>
<body>
<div class="container">

	<%@include file="header.jsp"%>
	
	<div class="text-right"><a class="btn btn-warning" href="add">添加用户</a></div>
		
	<br>
	
	<table class="table table-bordered table-hover">

	<tr>
		<th width="10%">ID</th>
		<th width="10%">账号</th>
		<th width="10%">昵称</th>
		<th width="10%">头像</th>
		<th width="10%">操作</th>
	</tr>
	
	<c:forEach var="user" items="${list}">
         <tr>
         	<td><p>${user.id}</p></td>
         	<td><p>${user.username}</p></td>
         	<td><p>${user.nickname}</p></td>
         	<td><img src="${user.icon}" width="100px"></td>
			<td>
				<a class="btn btn-primary" href="reset?id=${user.id}">重置密码</a>
				<a class="btn btn-info" href="edit?id=${user.id}">编辑</a>
				<a class="btn btn-danger" href="delete?id=${user.id}">删除</a>
			</td>
       	</tr>
     </c:forEach>
     
</table>

<br>${pageHtml}<br>

</div>
</body>
</html>